package com.ruoyi.hippocampus.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hippocampus.mapper.OrderdetailMapper;
import com.ruoyi.hippocampus.domain.Orderdetail;
import com.ruoyi.hippocampus.service.IOrderdetailService;

/**
 * 订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-05
 */
@Service
public class OrderdetailServiceImpl implements IOrderdetailService 
{
    @Autowired
    private OrderdetailMapper orderdetailMapper;

    /**
     * 查询订单明细
     * 
     * @param id 订单明细主键
     * @return 订单明细
     */
    @Override
    public Orderdetail selectOrderdetailById(Long id)
    {
        return orderdetailMapper.selectOrderdetailById(id);
    }

    /**
     * 查询订单明细列表
     * 
     * @param orderdetail 订单明细
     * @return 订单明细
     */
    @Override
    public List<Orderdetail> selectOrderdetailList(Orderdetail orderdetail)
    {
        return orderdetailMapper.selectOrderdetailList(orderdetail);
    }

    /**
     * 新增订单明细
     * 
     * @param orderdetail 订单明细
     * @return 结果
     */
    @Override
    public int insertOrderdetail(Orderdetail orderdetail)
    {
        return orderdetailMapper.insertOrderdetail(orderdetail);
    }

    /**
     * 修改订单明细
     * 
     * @param orderdetail 订单明细
     * @return 结果
     */
    @Override
    public int updateOrderdetail(Orderdetail orderdetail)
    {
        return orderdetailMapper.updateOrderdetail(orderdetail);
    }

    /**
     * 批量删除订单明细
     * 
     * @param ids 需要删除的订单明细主键
     * @return 结果
     */
    @Override
    public int deleteOrderdetailByIds(Long[] ids)
    {
        return orderdetailMapper.deleteOrderdetailByIds(ids);
    }

    /**
     * 删除订单明细信息
     * 
     * @param id 订单明细主键
     * @return 结果
     */
    @Override
    public int deleteOrderdetailById(Long id)
    {
        return orderdetailMapper.deleteOrderdetailById(id);
    }
}
